﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _5._22._1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("q请选择功能：");
            string a = Console.ReadLine();
            Robot b;
            b = Rb(a);
            b.Wroking();
            Console.ReadKey();

        }
        public static Robot Rb(string st)
        {
            Robot b;
            if (st.Equals("传菜"))
            {
                b = new DeliveryRobot("8", "111");
                return b;
            }
            else if (st.Equals("炒菜"))
            {
                b = new CookRobot("小三", "福鼎肉片");
                return b;
            }
            return b = new CookRobot("笑死", "宫保鸡丁");
        }
       

    }
}
